package com.e3.basdoc.goodscls.client;

import java.util.List;

import com.e3.basdoc.goodscls.model.GoodsClsModel;
import com.e3.template.tgf.MyTGFUI;
import com.e3.template.tgf.TGFEditorDialog;
import com.e3.template.tgf.TGFGridPanel;
import com.e3.template.tgf.TGFQueryDialog;
import com.e3.template.tgf.TGFSimpleFormPanel;
import com.e3.template.tgf.TGFTreePanelAsync;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class GoodsClsUI extends MyTGFUI<GoodsClsModel> {
	
	private GoodsClsRPCServiceAsync service = GoodsClsRPCService.Util.getInstance();

	@Override
	protected TGFSimpleFormPanel<GoodsClsModel> createFormPanel() {
		return new GoodsClsFormPanel();
	}

	@Override
	protected TGFGridPanel<GoodsClsModel> createGridPanel() {
		return new GoodsClsGridPanel();
	}

	@Override
	protected TGFQueryDialog<GoodsClsModel> createQueryDialog() {
		return new GoodsClsQueryDialog();
	}

	@Override
	protected TGFEditorDialog<GoodsClsModel> createEditorDialog() {
		return new GoodsClsEditorDialog();
	}

	@Override
	protected void executeDeleteService(final List<GoodsClsModel> models,AsyncCallback<Void> callback) {
		service.deleteGoodsClses(models, callback);
	}

	@Override
	protected String getCurrentLocalName() {
		return GoodsClsMessages.INSTANCE.local_name();
	}

	@Override
	protected GoodsClsModel createModelInstance() {
		return new GoodsClsModel();
	}

	@Override
	protected TGFTreePanelAsync<GoodsClsModel> createTreePanel() {
		return new GoodsClsTreePanel();
	}
	
	@Override
	protected String getDeletedDetailInfo(List<GoodsClsModel> models) {
		String msgs = super.getDeletedDetailInfo(models);
		return msgs+";"+GoodsClsMessages.INSTANCE.msg_delete_confirm_notice();
	}

}
